@(messages: List[Message],messageForm:Form[String])

@import helper._

@main("Notebook") {

	<h1>共@messages.size 条记录</h1>
    
    @messages.map { message =>

    		@message.id

    		@message.label

    		@form(routes.Application.deleteMessage(message.id)){

    			<input type="submit" value="删除" />
    		}
    		@form(routes.Application.updateMessage(message.id)){

			    @inputText(messageForm("label"))
		
    			<input type="submit" value="更新" />
    		}
			
    		<br/>

    }

    <h1>新增留言</h1>

    @form(routes.Application.newMessage){

	    @inputText(messageForm("label"))

	    <input type="submit" value="新增留言" />

    }
    
}